<!DOCTYPE html>
<html xml:lang="zh-CN" lang="zh-CN" class=" " style="transform: none;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover" />
    <meta name="renderer" content="webkit" />
    <meta name="force-rendering" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>{$Request.param.q?$Request.param.q:''} - {$Think.config.web.web_title}</title>
    <meta name="description" content="{$Think.config.web.web_desc}" />
    <meta name="keywords" content="{$Think.config.web.web_key}" />
    <meta property="og:type" content="index" />
    <meta property="og:title" content="{$Think.config.web.web_title}" />
    <meta property="og:image" content="{$Think.config.web.web_logo}" />
    <meta property="og:url" content="https://www.itmkk.com/" />
    <script src="{$view_path}/static/js/jquery-2.2.4.min.js"></script>
    <script src="{$view_path}/static/js/zblogphp.js"></script>
    <script src="{$view_path}/static/js/c_html_js_add.js"></script>

    <script src="{$view_path}/static/layui/layui.js" type="text/javascript"></script>

    <link rel="stylesheet" type="text/css" href="{$view_path}/static/layui/css/layui.css" />

    <link href="{$view_path}/static/css/font-awesome.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="{$view_path}/static/css/animate.css" type="text/css" media="all" />
    <link rel="stylesheet" href="{$view_path}/static/css/style.css" type="text/css" media="all" />

    {include file='layout/icon'}
    <!--[if lt IE 9]><script src="https://cdn.staticfile.org/html5shiv/3.7.0/html5shiv.js"></script><![endif]-->

</head>
<body class="home home-category" style="transform: none;">

{include file='layout/navmenu'}

<main id="list-main" class="main-content container clearfix" style="transform: none;">

    <div id="main" class="cate-main fl auto-side">
        <div id="pjaxmain">
            <div class="post-box auto-main clearfix">
                <nav class="main-navigation"><div class="modules-top"><h2 class="module-title">搜索一下</h2></div></nav>
                <script id="listData" type="text/html">
                    {{#  layui.each(d.data, function(index, item){ }}
                    <article id="list{{item.id}}" class="info-list auto-list clearfix wow fadeInDown" style="visibility: hidden; animation-name: none;">
                        <figure class="info-thumb">
                            <a href="{{item.temp_archives}}?id={{item.id}}" title="{{item.title}}" target="{{item.target}}">
                                <img width="280" height="210" src="/{{item.articleThumbImg}}" alt="{{item.title}}" />
                            </a>
                        </figure>
                        <div class="info-items">
                            <div class="info-limit">
                                <h3 class="od-2v">
                                    <a href="{{item.temp_archives}}?id={{item.id}}" title="{{item.title}}" target="{{item.target}}">
                                        {{item.title}}
                                    </a>
                                </h3>
                                <p class="info-desc od-2v">
                                    {{item.description}}
                                </p>
                            </div>
                            <div class="info-meta">
                                <a class="meta-cate-url" href="{{item.temp_list}}?id={{item.cid}}" >
                                    <i class="fa fa-dot-circle-o"></i>{{item.name}}
                                </a>
                                <div class="flex-fill"></div>
                                <span class="info-time" title="{{item.createTime}}">
                                    <i class="fa fa-clock-o"></i>{{item.createTime}}
                                </span>
                                <span class="info-viewnums"><i class="fa fa-eye" title="浏览数"></i>{{item.views}}</span>
                                <span class="info-comment"><i class="fa fa-commenting" title="评论数"></i>{{item.feed}}</span>
                            </div>
                        </div>
                    </article>
                    {{#  }); }}
                </script>
                <div id="view"></div>

            </div>
            <footer class="pagination wow fadeInDown" style="visibility: visible; animation-name: fadeInDown;">
                <!----------分页显示-------->
                <div id="showpage"></div>

            </footer>
        </div>
    </div>

    {include file='layout/list-right'}

</main>

{include file='layout/footer'}

<script>var cookieDomain = "https://itmkk.com/";</script>
<script src="{$view_path}/static/js/zh_tw.js"></script>
<script src="{$view_path}/static/js/custom.js"></script>
<script src="{$view_path}/static/js/wow.min.js"></script>
<!---->
</body>
<script>
    layui.use(['table', 'laytpl'], function(){
        var table = layui.table;
        var laytpl = layui.laytpl;

        // 数据列表
        table.render({
            elem: '#showpage',
            url:'/api/article/search',
            page:true,
            limit:12,
            where:{
                q:"{$Request.param.q?$Request.param.q:''}",
            },
            response: {
                statusCode: 200 // 重新规定成功的状态码为 200，table 组件默认为 0
            },
            done:function(res,curr,count,origin){
                //console.log(res);
                var getTpl = document.getElementById('listData').innerHTML; // 获取模板字符
                var elemView = document.getElementById('view'); // 视图对象
                // 渲染并输出结果
                laytpl(getTpl).render(res, function(str){
                    elemView.innerHTML = str;
                });
            }
        });
    });
</script>
</html>